package com.enfi.api.modules.ext.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xukk
 * @date 2020/3/10
 */
@Controller
@RequestMapping("ws")
public class WsController {

    private String ws="ws/";

    @RequestMapping({"/chat1","/chat1.html"})
    public String chat1(HttpServletRequest request, Model model) {
        String path = request.getRequestURI().substring(request.getRequestURI().lastIndexOf("/") + 1).replace(".html", "");
        return ws + path;
    }
}
